﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

using Pg.BioMedics.SDR.Data.Caching;

namespace Pg.BioMedics.SDR.Services
{
    /// <summary>
    /// An interface of the cache managment service. This service provides a bridge 
    /// between data caching framework and hosting environment allowing 
    /// environment to load and clear caches
    /// </summary>
    [ServiceContract]
    public interface ICacheManagementService : IService
    {
        /// <summary>
        /// Fills cached data context with data
        /// </summary>
        [OperationContract]
        void Fill();

        /// <summary>
        /// Clears cache memory. Removes all cached objects from the memory
        /// and puts caches into not initialized state
        /// </summary>
        [OperationContract]
        void Clear();

        /// <summary>
        /// Checks if caches has been filled
        /// </summary>
        /// <returns>Caches has been initialized</returns>
        [OperationContract]
        bool IsInitialized();
    }
}
